package com.halflife.comeElectricity.orderMng.order;

import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Repository
public interface OrderRepository {
    int deleteByPrimaryKey(Integer id);

    int insert(Order record);

    int insertSelective(Order record);

    Order selectByPrimaryKey(Integer id);

    List<Order> selectOrders(Map<String, Object> param);

    /**
     * 根据订单状态查询订单
     * @param param
     * @return
     */
    List<Order> selectOrdersByStatus(Map<String, Object> param);

    int selectCountOrders(Map<String, Object> param);
    /**
     * 查询所有订单页面
     * @param record
     * @return
     */
    List<Order> selectOrderByPage(HashMap<String, Object> param);

    /**
     *  查询订单数量
     * @param record
     * @return
     */
    int selectCountOrderByPage(HashMap<String, Object> param);

    int updateByPrimaryKeySelective(Order record);

    int updateByPrimaryKey(Order record);
}